Method and Apparatus for Image Data Transformation

ABSTRACT

Image data is transformed for display on a target display. A sigmoidal transfer function provides a free parameter controlling min-tone contrast. The transfer function may be dynamically adjusted to accommodate changing ambient lighting conditions. The transformation may be selected so as to automatically adapt image data for display on a target display in a way that substantially preserves creative intent embodied in the image data. The image data may be video data.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Patent Application61/453,107, filed on 15 Mar. 2011 and U.S. Provisional PatentApplication No. 61/567,784 filed on 7 Dec. 2011, both of which arehereby incorporated herein by reference in entirety for all purposes.

The present application is also related to International PatentApplication No. PCT/US2012/027267, filed on 1 Mar. 2012, incorporatedherein by reference.

TECHNICAL FIELD

The invention relates to displaying and processing images. The inventionrelates specifically to methods and apparatus involving tone and/orgamut mapping. Methods and apparatus as described herein may be appliedto provide quality images on destination displays while preservingcreative intent. The invention may be embodied, for example, inelectronic displays such as televisions, computer monitors, mediaplayers, video capable portable telephones and other portable devices,specialized displays such as virtual reality displays, advertisingdisplays, and the like as well as to upstream image processing equipmentsuch as set top boxes, access points and the like.

BACKGROUND OF THE INVENTION

Patent publications in the general field of this invention include thefollowing:

-   US20010050757;-   US20020075136;-   US20020080245;-   US20070127093;-   US20080094515;-   US20080170031;-   US20080186707;-   US20090201309;-   US20090267876;-   US20100007599;-   US201000118008;-   U.S. Pat. No. 7,158,673;-   U.S. Pat. No. 6,989,859;-   U.S. Pat. No. 5,276,779; and-   JP2002092655.

The creator of a video production or other image (for example adirector, colorist, or the like) may set tones and colors of pixels inthe image so that, when viewed, the image has a desired appearance whichagrees with the creator's creative intent. For example, a creator maywish some scenes to have a darker, more oppressive, feel than others.The creator may wish certain features depicted in a scene to stand outor to be less prominent. Adjusting tones and colors of pixels in animage may include performing color grading (or ‘color timing’) on thesource video data. Color grading may be performed using ahardware/software system that permits a user to change the video data invarious ways to achieve a desired appearance.

Various display technologies are now available. For example, there areplasma displays, LCD displays backlit by a variety of types of lightsources such as LEDs of various types, fluorescent lamps orhigh-intensity incandescent lamps, CRT-based displays, digital cinemadisplays, etc. A particular display combines display hardware with videosignal processing components that receive video signals and drivedisplay hardware to display video content of the video signals.

Different displays may vary significantly with respect to features suchas:

-   -   the color gamut that can be reproduced by the display;    -   the maximum brightness achievable;    -   contrast ratio;    -   resolution;    -   acceptable input signal formats;    -   color depth;    -   white level;    -   black level;    -   white point;    -   grey steps;    -   etc.        Consequently, the same image content may appear different when        played back on different displays. Image content that matches a        creator's creative intent when displayed on some displays may        depart from the creator's creative intent in one or more ways        when viewed on other displays.

Some current displays can outperform displays that were state-of-the-artat a time when certain content was created in one or more aspects. Forexample, new displays may be capable of providing images that havebrighter highlights, greater contrast, and/or wider color gamuts thanolder displays. It can be desirable to take advantage of these improvedcapabilities without departing significantly from the creative intentembodied in the content being viewed.

It may be desirable to play video content created to take advantage ofhigh-performance displays on legacy displays or displays that have lowercapabilities. It would be desirable to provide methods and apparatus foradapting the appearance of video and other images displayed on differentdisplays to preserve as much as possible a creative intent embodied inthe image data.

The perception of color and luminance can be affected by ambientconditions. Video or other images presented under theater conditions(low ambient lighting) may be perceived by viewers significantlydifferently than the same video or other images would be perceived whenviewed under conditions with significant ambient light. Further, thecharacteristics (such as the color temperature) of ambient light canaffect a viewer's perception of video content. It would be desirable todisplay video or other images taking into account the environment inwhich the content is being viewed to preserve as much as possible acreative intent embodied in the video or other images.

There is a need to provide viewers of images (including still and/orvideo images) with viewing experiences that exploit the capabilities ofdisplays on which they view the images. There remains a need forapparatus and methods which may be applied to adjust image data suchthat video or other image content encoded in the image data has adesired appearance when played.

SUMMARY OF THE INVENTION

The invention has a range of aspects. These include, without limitation,apparatus which comprises gamut transformation functionality; method forgamut transformation, methods for adapting display of image content totake account of ambient lighting conditions; program products comprisingcomputer readable code which, when executed by a data processor causesthe data processor to execute a method according to the invention.

One non-limiting aspect provides apparatus comprising a pixel coordinatemapping unit that is configured to transform image data according to atransfer function. The transfer function is characterized by a pluralityof anchor points and a free parameter. The transfer function has amid-range slope controlled by the free parameter. Transformations at theanchor points are not affected by the free parameter. Such apparatus canbe useful for transforming color-graded content for display on aparticular target display, for example.

In some embodiments the apparatus comprises or receives a signal from anambient light sensor and a circuit connected to receive anambient-lighting signal from the ambient light sensor is configured tocontrol one or more of the free parameter and a coordinate of one of theanchor points based at least in part on the ambient-lighting signal.

In some embodiments the image data comprises sets of pixel values forpixels in an image. The sets of pixel values comprise color values foreach of a plurality of primary colors (for example, values correspondingto red, green and blue primary colors). The apparatus comprises aplurality of the pixel coordinate mapping units each connected totransform a corresponding one of the color values. The parameters forthe transfer functions in the different coordinate mapping units may bethe same or different. With properly selected different parameters thetransformations may perform color correction as well as gamuttranslation.

Another aspect of the invention comprises methods for mapping image datafor display on a target display. The methods comprise transforming pixelvalues of the image data to corresponding transformed pixel valuesaccording to a transfer function. The transfer function is characterizedby a plurality of anchor points and a free parameter. The transferfunction has a mid-range slope controlled by the free parameter.Transformations of pixel values corresponding to the anchor points arenot affected by the free parameter. In some embodiments, one or more ofthe free parameter and the location of a mid-range anchor point areautomatically changed to account for ambient lighting and/or adaptationof viewers' visual systems.

Another aspect comprises methods for mapping image data for display on atarget display by combining a global tone-mapping transformation with alocal multi-scale tone mapping operation.

Another aspect provides color manipulation apparatus. The apparatus maycomprise a workstation for modifying still or video images for example.The apparatus may be applied for modifying color values in image data.The color manipulation apparatus comprises a first memory or input forsource image data and a second memory or output for modified image data.A pixel coordinate mapping unit is connected to access the first memoryor input and configured to transform the source image data according toa transfer function characterized by a plurality of anchor points and afree parameter. The transfer function has a mid-range slope controlledby the free parameter, wherein transformations at the anchor points arenot affected by the free parameter to yield the modified image data andto provide the modified image data to the second memory or output. Auser input is configured to accept from a user a value for the freeparameter. A display connected to display the modified image data. Auser may adjust the value of the free parameter to obtain a desiredappearance of the image displayed on the display.

Further aspects of the invention and features of specific embodiments ofthe invention are described below.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings illustrate non-limiting embodiments of theinvention.

FIG. 1 is a schematic depiction of a video distribution pipeline.

FIG. 2 shows apparatus according to an example embodiment of theinvention.

FIG. 3 illustrates an example transfer function.

FIG. 4 is a flow chart illustrating a method which uses informationabout a target display and input image data to determine appropriatevalues for parameters defining a transfer function.

FIG. 5 is a flow chart illustrating a method for processing image dataaccording to an example embodiment.

FIG. 6 depicts a flow chart illustrating a method that combines a globaltone-mapping operator with a local multi-scale tone-mapping operatoraccording to an example embodiment.

DESCRIPTION OF THE INVENTION

Throughout the following description, specific details are set forth inorder to provide a more thorough understanding of the invention.However, the invention may be practiced without these particulars. Inother instances, well known elements have not been shown or described indetail to avoid unnecessarily obscuring the invention. Accordingly, thespecification and drawings are to be regarded in an illustrative, ratherthan a restrictive, sense.

FIG. 1 shows schematically a video distribution pipeline 20. Raw videodata 22 is acquired and edited at an editing suite 23 to provide a rawvideo production 24. Tones and/or colors in the raw video production areadjusted at a color timing station 26 by a colorist (e.g. a human whouses tools provided by the color timing station by way of a suitableuser interface) to achieve a color timed video production 27. Colortiming station 26 includes a professional monitor 30 on which thecolorist views the video production. Using tools and controls providedby color timing station 26, the colorist adjusts tones and/or colors ofall or parts of the images which make up the video production to achievean overall appearance which, when viewed on display 30, matches thecolorist's artistic intent.

If all viewers of color timed video production 27 watched the videoproduction on a display identical to display 30 under ambient conditionsidentical to those experienced by the colorist then, exceptingindividual variations in the human perception of images, the viewerswould all see the video production exactly as intended by the colorist(i.e. in a manner true to the colorist's artistic intent). Given thevery wide range of displays that are in use, it is unrealistic to expectthat viewers will all have the same display or even that displays onwhich different viewers will view a video production will have similarcharacteristics such as maximum brightness, black level and color gamut.

One aspect of the invention provides mapping methods and apparatus thatmay be applied automatically to map tones and/or colors from image datasuch as, for example, color timed video production 27 for display on aparticular destination display in a manner that closely replicates theviewing experience of the colorist.

In some embodiments, the mapping methods and apparatus provide directcontrol over one or more of:

-   average image brightness (adaptation point);-   mid-tone local contrast;-   color saturation;-   level at which input black is displayed; and-   level at which input white is displayed.

These parameters affect the viewing experience.

FIG. 2 shows apparatus 40 according to an example embodiment of theinvention. In this example, apparatus 40 has an input 42 for receivingvideo data 43 to be displayed on a screen 44 of a target display 41 forviewing by a viewer V. Video data 43 may comprise color-timed video dataembodying the intent of a creator. Apparatus 40 comprises a color spacetranslator 46 that translates pixel values for video data 43 into acolor space that is native to target display 41. In the illustratedexample embodiment, the native color space of target display 41 is anRGB color space, which specifies colors in terms of the intensities ofprimary colors of target display 41.

Color space translator 46 may comprise, for example, a matrix multiplierthat multiplies a vector of pixel values in video data 43 by a 3×3matrix to yield a vector of display 41 native color space values (e.g.,RGB values). The transfer matrix may be specified taking into accountthe primaries and white point of target display 41. In some embodiments,color space translator 46 may be configured to apply a color spacetransformation matrix without scaling for peak luminance. As explainedbelow, this may make selection of parameters for subsequently imageprocessing operations more intuitive.

In the following example, pixel values in video data 43 are representedin an XYZ color space and color space translator 46 performs atranslation from XYZ color space into positive RGB values. The inventionis not limited to color data presented in an XYZ color space. Video data43 may be presented in any suitable color space.

Negative RGB values may result for translations of combinations of pixelvalues that are out-of-gamut (e.g. colors that cannot be reproducedusing any available combination of the primary colors used by thedisplay). Any negative RGB values generated by color space translator 46may be clipped to a low non-negative value. In the alternative,out-of-gamut pixel values may be mapped to in-gamut pixel values priorto the translation (e.g., according to a mapping within the color spaceof video data 43). This may be performed by a separate mapping unit orby a component of color space translator 46 for example.

After being processed by color space translator 46 video data 43comprises values 48R, 48G, and 48B which respectively correspond to red,green and blue (RGB) primaries of target display 41.

Each of values 48R, 48G, and 48B is independently mapped to a new valueby a mapping unit 50. Mapping units 50R, 50G, and 50B are shown. Eachmapping unit maps a corresponding input value received from color spacetranslator 46 to a transformed value. In the illustrated embodiment, thetransformed values are indicated by 48R′ 48G′ and 48B′ respectively.

Each mapping unit 50 maps its input value to an output value accordingto a transfer function 55. Advantageously, transfer function(s) 55 maybe characterized by a plurality of fixed points, which may be referredto as ‘anchor points’, and a free parameter that adjusts a slope of thetransfer function in a mid-range region. This slope corresponds tomid-range contrast. Adjustment of the free parameter provides a meansfor controlling mid-range contrast. The transfer function may be linearor approach linearity in the mid-range region.

FIG. 3 shows an example transfer function. In FIG. 3, input values areindicated on the horizontal axis and output values are indicated on thevertical axis. Each axis has a logarithmic scale. Transfer function 55is characterized by a maximum value 56A for output values, a minimumvalue 56B for output values and a substantially linear mid-tone region56C. The transfer functions 55R, 55G and 55B applied to red, blue, andgreen channel signals by mapping units 50A, 50B and 50C may be identicalor different. Mapping units 50A, 50B and 50C may be completelyindependent or may share hardware and/or software components.

In an example embodiment, transfer function 55 is given by the followingequation:

$\begin{matrix}{V^{\prime} = \frac{C_{1}C_{2}V^{n}}{1 + {C_{3}V^{n}}}} & (1)\end{matrix}$

where C₁, C₂, and C₃ are constants, V is the input value for the colorchannel, V′ is the output value for the color channel, and n is aparameter. The transfer function of Equation (1) is an example of aparameterized sigmoidal tone curve function.

Other parameterized transfer functions may be used in the alternative.In some embodiments the transfer function includes parameters thatprovide control over one or more of low-end slope, high-end slope, and“sharpness” of the roll-off at the top and bottom ends of the transferfunction.

One method for establishing values for the parameters in Equation (1) ina specific case is illustrated by the method 70 of FIG. 4. Method 70uses information about the target display and information about adisplay used in color-timing or approving the input video data (a‘color-timing display’) to determine appropriate values for theparameters of Equation (1). Block 71 identifies three luminance anchorpoints on curve 55. A first anchor point 57A has horizontal and verticalcoordinates respectively equal to black levels of the color-timingdisplay and the target display. In some embodiments information aboutthe color-timing display is inferred from the input signal. For example,a black level for the color-timing display may be inferred from theinput signal by taking a small percentile (e.g. the 0.1 percentile) ofthe luminance channel in the input signal. A black level for the targetdisplay is the black level for the target display.

A second anchor point 57B has as its horizontal coordinate a white levelfor the color-timing display and, as a vertical coordinate, a whitepoint for the target display. For example, a white point for thecolor-timing display may be inferred from the input signal as themaximum value of any color channel in the input signal.

The position of a middle anchor point 57C affects the overall brightnessof a displayed image (e.g. the ‘key’ of the image). Appropriateselection of mid-tone anchor point 57C facilitates the input image beingperceived as being appropriately bright on the target display.

The horizontal location of point 57C may be set in various ways; theseinclude the following:

-   -   calculating the geometric mean of the input luminance;    -   selecting a fixed value that would be perceived in the        color-grading environment as being a suitable middle value. For        example, in some embodiments this value could be set to a level        such as 10.

The vertical value for point 57C may be based on a luminance levelcorresponding to middle grey for the target display. For example, in adisplay that can produce luminance values between 1 cd/m² and 400 cd/m²,middle grey is approximately 20 cd/m² (which is logarithmically half-waybetween 1 and 400 cd/m²). An appropriate value for point 57C maytherefore be a value corresponding to middle grey (about 20 cd/m² inthis example). In embodiments where color space translator 46 isconfigured to apply a color space transformation matrix without scalingfor peak luminance, a value of 20 will correspond to a middle grey of 20cd/m².

In some embodiments, the mid-tone anchor point 57C is selected so as tomake the ratio of the coordinate of the mid-tone anchor point to thecoordinate of the white anchor point equal, within a desired factor, forboth the input and output of the transfer function.

In some embodiments, different transfer functions for each of the RGBcoordinates may be used to provide a transformation such that the whitepoint of the video data is transformed to match the white point of thetarget display and/or target viewing environment. One way to achievethis is to express the white point of the input video data in terms ofchromaticity coordinates (such as, for example, CIE x,y chromaticitycoordinates) and to convert to scaled XYZ values given by the followingequations:

$\begin{matrix}{X = \frac{x}{y}} & (2) \\{Y = 1} & (3) \\{Z = \frac{1 - x - y}{y}} & (4)\end{matrix}$

These XYZ values may subsequently be converted to the RGB color spacefor the target display to yield a white point for the input data whichmay be denoted as (R, G, B)_(wp, in). In cases where the source andtarget white points are the same, both white points should be (111) inthe normalized RGB coordinates. Coordinates for anchor points 57A, 57B,57C for the red, green and blue channels can then be obtained bymultiplying luminance anchor values by the white point values asfollows:

(R, G, B)_(min,in) =Y _(min,in)(R, G, B)_(wp.in)   (5)

(R, G, B)_(max,in) =Y _(max,in)(R, G, B)_(wp.in)   (6)

(R, G, B)_(mid,in) =Y _(mid,in)(R, G, B)_(wp.in)   (7)

(R, G, B)_(min,out) =Y _(min,out)(R, G, B)_(wp.out)   (8)

(R, G, B)_(mid,out) =Y _(mid,out)(R, G, B)_(wp.out)   (9)

(R, G, B)_(max,out) =Y _(max,out)(R, G, B)_(wp.out)   (10)

where the subscript ‘in’ denotes the input image data, the subscript‘out’ denotes the output data (i.e. the data being passed on fordisplay); (Y_(max,in), Y_(max,out)) are the unadjusted coordinates foranchor point 57B; (Y_(min,in), Y_(min,out)) are the unadjustedcoordinates for anchor point 57A; and (Y_(mid,in), Y_(mid,out)) are theunadjusted coordinates for anchor point 57C; and (R, G, B)_(wp,out) arethe RGB coordinates of the white point of the target display.

Equations (5) through (10) provide a set of three anchor points for eachcolor channel. For example, anchor point 57A for the red color channelis given by (R_(max.in), R_(max,out)); anchor point 57B for the redcolor channel is given by (R_(min,in), R_(min,out)); and anchor point57C for the red color channel is given by (R_(mid,in), R_(mid,out)).Where the white points for the input video data and target display arenot the same, the sets of anchor points will be different, this resultsin a different transfer function for each color channel.

The transfer function for each color channel of the form provided byEquation (1) may be obtained from the coordinates of the correspondinganchor points by performing the computation:

$\begin{matrix}{\begin{pmatrix}c_{1} \\c_{2} \\c_{3}\end{pmatrix} = {\frac{1}{\begin{matrix}{{x_{3}{y_{3}\left( {x_{1} - x_{2}} \right)}} + {x_{2}y_{2}\left( {x_{3} - x_{1}} \right)} +} \\{x_{1}{y_{1}\left( {x_{2} - x_{3}} \right)}}\end{matrix}}\begin{pmatrix}{x_{2}{x_{3}\left( {y_{2} - y_{3}} \right)}} & {x_{1}{x_{3}\left( {y_{3} - y_{1}} \right)}} & {x_{1}{x_{2}\left( {y_{1} - y_{2}} \right)}} \\\left( {{x_{3}y_{3}} - {x_{2}y_{2}}} \right) & \left( {{x_{1}y_{1}} - {x_{3\;}y_{3}}} \right) & \left( {{x_{2}y_{2}} - {x_{1}y_{1}}} \right) \\\left( {x_{3} - x_{2}} \right) & \left( {x_{1} - x_{3}} \right) & \left( {x_{2} - x_{1}} \right)\end{pmatrix}\begin{pmatrix}y_{1} \\y_{2} \\y_{3}\end{pmatrix}}} & (11)\end{matrix}$

in which x₁, x₂ and x₃ are given by:

$\begin{matrix}{\begin{pmatrix}x_{1} \\x_{2} \\x_{3}\end{pmatrix} = \begin{pmatrix}V_{\min,{in}^{n}} \\V_{{mid},{in}^{n}} \\V_{\max,{in}^{n}}\end{pmatrix}} & (12)\end{matrix}$

and y₁, y₂ and y₃ are given by:

$\begin{matrix}{\begin{pmatrix}y_{1} \\y_{2} \\y_{3}\end{pmatrix}\begin{pmatrix}V_{\min,{out}^{n}} \\V_{{mid},{out}^{n}} \\V_{\max,{out}^{n}}\end{pmatrix}} & (13)\end{matrix}$

One feature of the transfer functions described above is that n remainsa free parameter. This permits the mid-tone contrast to be set to anydesired level. It should be noted that the log-log slope at the mid-toneanchor point will differ slightly from the value of n if the mid-toneanchor point is not centered in the input and output ranges. However,the mid-tone contrast can be set by adjusting the value for n. A goodstarting point for the mid-tone contrast parameter, n, is 1. This valuefor n ensures that the mapped scene has substantially similar mid-rangelocal contrast on the target display and in the original scene.

With transfer functions as given above, the display linear luminancevalues for each of the red, green and blue color channels can beexpressed as follows:

$\begin{matrix}{R_{out} = \frac{c_{1R} + {c_{2R}R_{in}^{n}}}{1 + {c_{3\; R}R_{in}^{n}}}} & (14) \\{G_{out} = \frac{c_{1G} + {c_{2G}G_{in}^{n}}}{1 + {c_{3G}G_{in}^{n}}}} & (15) \\{B_{out} = \frac{c_{1B} + {c_{2B}B_{in}^{n}}}{1 + {c_{3B}B_{in}^{n}}}} & (16)\end{matrix}$

These values may be used to drive the target display to display theimage. In some embodiments, these values may be corrected for the targetdisplay's response to linear input values (e.g., normalized) beforebeing used to drive the target display.

In some embodiments, normalized drive values (R_(norm), G_(norm),B_(norm)) for the target display are computed using the followingrelationships:

$\begin{matrix}{R_{norm} = \frac{R_{out} - R_{{out},\min}}{R_{{out},\max} - R_{{out},\min}}} & (17) \\{G_{norm} = \frac{G_{out} - G_{{out},\min}}{G_{{out},\max} - G_{{out},\min}}} & (18) \\{B_{norm} = \frac{B_{out} - B_{{out},\min}}{B_{{out},\max} - B_{{out},\min}}} & (19)\end{matrix}$

Normalized values may be scaled to the range of driving signals for thetarget display (e.g., to the range 0-255 for an 8-bit target display).

Optionally, image colors may be enhanced by increasing color saturation.This may be done, for example, using the following relationships:

$\begin{matrix}{R^{\prime} = \frac{{aR}_{norm} + {bG}_{norm} + {cB}_{norm}}{a + {b\left( \frac{G_{norm}}{R_{norm}} \right)}^{S} + {c\left( \frac{B_{norm}}{R_{norm}} \right)}^{S}}} & (20) \\{G^{\prime} = {R^{\prime}\left( \frac{G_{norm}}{R_{norm}} \right)}^{S}} & (21) \\{B^{\prime} = {R^{\prime}\left( \frac{B_{norm}}{R_{norm}} \right)}^{S}} & (22)\end{matrix}$

Values for a, b and c in Equation (20) may be defined with reference tothe elements of an inverse transform matrix M corresponding to theinverse color space translator 46 ([X, Y, Z]^(T)=M*[R, G, B]),specifically a may be given by: a=M(2,1), b may be given by: b=M(2,2),and c may be given by: c=M(2,3). In Equations (20), (21) and (22), S isa free parameter. Values for S greater than 1 will cause the colorsaturation to be increased. Values for S less than 1 will cause thecolor saturation to be decrease (i.e. will cause colors to become morede-saturated).

When necessary or desired, the normalized drive values may be gammacorrected. This may be done, for example, according to the followingrelationships:

R _(corrected) =R _(norm) ^(1/γ)  (23)

G _(corrected) =G′ _(norm) ^(1/γ)  (24)

B _(corrected) =B _(norm) ^(1/γ)  (25)

where γ is the display response. γ is approximately 2.2 in some targetdisplays. Where normalized drive values are re-saturated, gammacorrection may be performed on re-saturated drive values (R′, G′ andB′).

In some embodiments, image colors are re-saturated to restore, at leastapproximately, the saturation lost as a result of tonal compression.Where tonal compression is not constant across the range of tones in animage, different levels of tonal compression applied to different tonesresults in different colors being de-saturated to different degrees. Ingeneral, the greater the amount of tonal compression, the greater theamount of de-saturation. The amount of tonal compression may bequantified by the log-log slope of the tone-curve. As an illustrativeexample, the sigmoidal tone curve function plotted as curve 55 in FIG. 3has a steeper log-log slope substantially in the substantially linearmid-tone region 56C than it does in the vicinity of maximum value 56Aand minimum value 56B. Accordingly, tone compression going from theinput (horizontal coordinate) to output (vertical coordinate) is greaterin the vicinity of values 56A and 56B as compared with substantiallylinear mid-tone region 56C.

Applying a global re-saturation technique may re-saturate all pixelswithout regard to the amount of de-saturation caused by tonalcompression. Some embodiments re-saturate transformed image data pixelsaccording to the amount of tonal compression of the transformed imagedata pixels. Given that the amount of tonal compression corresponds tothe log-log slope of the tone-curve, the amount of tonal compression foran input value L_(in) may be determined as the derivative of thetransfer function L_(out)=f(L_(in)) at the input value L_(in). Thelog-log slope of this transfer function can be determined by settingL_(in)=e^(x) and L_(out)=e^(y) and solving for dy/dx, which representsthe log-log slope. For a tone curve according to Equation (1) above,

y may be expressed as:

y=log(c ₁ +c ₂ e ^(nx))−log(1+c ₃ e ^(nx))   (26)

and the log-log slope c(L_(in)) at any point on the tone curve may becalculated as the derivative of y with respect to x at L_(in):

$\begin{matrix}{{c\left( L_{in} \right)} = {\frac{y}{x} = \frac{{nL}_{in}^{n}\left( {c_{2} - {c_{1}c_{3}}} \right)}{\left( {c_{1} + {c_{2}L_{in}^{n}}} \right)\left( {1 + {c_{3}L_{in}^{n}}} \right)}}} & (27)\end{matrix}$

For color channels R, G, and B, re-saturated drive values (R_(re-sat),G_(re-sat), B_(re-sat)) may be determined in terms of the normalizeddriving values as follows:

$\begin{matrix}{R_{{re} - {sat}} = {R_{norm}\left( \frac{C_{in}}{L_{in}} \right)}^{{f{(c)}} - c}} & (28) \\{G_{{re} - {sat}} = {G_{norm}\left( \frac{C_{in}}{L_{in}} \right)}^{{f{(c)}} - c}} & (29) \\{B_{{re} - {sat}} = {B_{norm}\left( \frac{C_{in}}{L_{in}} \right)}^{{f{(c)}} - c}} & (30)\end{matrix}$

where f(c) is given as:

$\begin{matrix}{{f(c)} = \frac{\left( {1 + k_{1}} \right)c^{k_{2}}}{1 + {k_{1}c^{k_{2}}}}} & (31)\end{matrix}$

and k₁ and k₂ are constants. In some embodiments k₁=1.6774. In someembodiments, k₁=1.677. In some embodiments, k₁=1.68. In some embodiments(including without limitation some embodiments in which k₁=1.6774,k₁=1.677 or k₁=1.68) k₂=0.9925. In some embodiments (including withoutlimitation some embodiments in which k₁=1.6774, k₁=1.677 or k₁=1.68)k₂=0.992. In some embodiments (including without limitation someembodiments in which k₁=1.6774, k₁=1.677 or k₁=1.68) k₂=0.99. It will beappreciated that acceptable results may be obtained using other valuesof k₁ and k₂. It will also be appreciated that re-saturated drivevalues, R_(re-sat), G_(re-sat) and B_(re-sat) could be calculated basedon the display linear luminance values for each of the red, green andblue color channels (R_(out), G_(out) and B_(out)).

It will be appreciated that the above-described technique for tonalcompression-dependent re-saturation may be practiced in a manner that isparameter free (automatic).

FIG. 5 is a flow chart illustrating a method 80 according to a furtherexample embodiment. Method 80 incorporates a number of optional steps.In block 81 method 80 converts image data into a color space of thetarget display. In the illustrated example the target display has red-green- and blue-primaries and the color space is an RGB color space.Block 81 may comprise performing a transformation that takes intoaccount the white point and primaries of the target display. Block 81 isoptional in the event that the image data is already in the native colorspace of the target display.

Block 82 determines chromatic white points for the source and target.The white points may, for example, be represented as chromaticitycoordinates in any suitable color space and converted to the nativecolor space of the target display.

Block 83 establishes initial black level and white level anchor pointsfor a transfer function. The initial anchor points may be set based onblack and white levels for the source and for the target display.

Block 84 establishes an initial mid-tone anchor point for the transferfunction. The mid-tone anchor point may be determined through analysisof the source image data (e. g. by determining a geometric mean of theluminance of the source image data) and determining characteristics ofthe target display (or characteristics of the target display and thecurrent viewing environment at the target display).

Block 85 adjusts the anchor points based on the white points determinedin block 82 (applying, for example Equations (5) to (10)).

Block 86 maps the image data using transfer functions specified by theadjusted anchor points determined in block 85.

Block 87 computes drive values for the target display based on themapped image data from block 86.

Optional block 88 adjusts color saturation (block 88 may, for example,apply Equations (20) to (22) or (28) to (30)).

Block 89 gamma corrects the drive values.

The drive values produced through application of method 80 may beapplied to drive the target display to display images and/or stored ortransmitted for later display on the target display.

Apparatus and methods as described herein may be used to optimize atarget display for specific ambient viewing conditions. Transferfunctions of the general type described above may be shifted dynamicallyto accommodate changes in ambient lighting and the resulting changingadaptation level of the human visual system (HVS). The ideal luminancemid-point for the target display may be a function of the ambient light.The vertical component of the mid-tone anchor point may be selectedbased upon the ambient lighting conditions.

In some embodiments, fixing the middle anchor point 57C is done based inpart on ambient lighting or on an estimated adaptation of viewers' eyes(which itself may be based at least in part on measured ambient lightingor on a combination of measured ambient lighting and past displaycontent) as well as characteristics of the target display. For example,the vertical coordinate of point 57C may be adjusted based upon ambientlighting in the vicinity of the target display. For example, thevertical coordinate could be reduced to a lower luminance value if thedisplay is in dark ambient lighting conditions (or the viewer's eyes areestimated to be dark-adapted) and the value could be increased to ahigher value where the target display is in an environment having highambient lighting (or the viewers' eyes are estimated to be adapted tobrighter conditions).

In some embodiments, the amount of saturation adjustment (e.g.,according to Equations (20), (21) and (22) and Equations (28), (29) and(30)) is based in part on ambient lighting or on an estimated adaptationof viewers' eyes (which itself may be based at least in part on measuredambient lighting or on a combination of measured ambient lighting andpast display content) as well as characteristics of the target display.For example, the parameter S may be adjusted based upon ambient lightingin the vicinity of the target display or on a combination of measuredambient lighting and past displayed content. For example, the value ofthe parameter S could be set relatively lower if the display is in darkambient lighting conditions (or the viewer's eyes are estimated to bedark-adapted) and the value could be set relatively higher where thetarget display is in an environment having high ambient lighting (or theviewers' eyes are estimated to be adapted to brighter conditions). Someembodiments provide a resaturation control unit that receives a signalfrom an ambient light sensor and/or signals containing past imagecontent and/or signals indicative of the overall brightness of pastdisplayed content. The resaturation control unit may be configured toset new values for a parameter (for example the parameter S) thataffects an amount of resaturation based on the received signal(s).

In some embodiments, spectral characteristics of the ambient lightingare taken into account. For example, the location of points 57C in thetransfer functions for each color channel may be separately set based inpart on the amount of ambient lighting in a spectral range correspondingto the color channel.

Additionally or in the alternative, the slope of the transfer functionsmay be controlled based on ambient lighting (or estimates of theadaptation of viewers' eyes). Where ambient light is brighter,reflections from a display surface tend to raise the black level. Thiseffectively reduces the range of the target display. Under high ambientlighting conditions (viewers' eyes are estimated to be light-adapted)the slope of the transfer curve in the mid-tone to region may be reducedto provide an enhanced viewing experience under the ambient conditions.For example, for low (dark) ambient lighting conditions, the perceptionof contrast decreases. This can result in an image appearing “flat”.Thus the slope of the mid-tone part of the transfer function may beincreased from a slope of 1:1, to a greater slope, such as a slope up to1:1.5 or so (for example, a slope of 1.3) to increase the contrast levelfor dark-adapted eyes. This may be done by changing the value of thefree parameter n where transfer functions of the type illustrated byEquation (1) are applied. The slope may be controlled in response to aninput from an ambient light sensor.

In some embodiments a light-adaptation circuit is provided thatestimates an adaptation level of the human visual system in response toinputs which may include a signal from the ambient light sensor, asignal that represents a weighted average or other indicator of thebrightness of historical image content or the like. The light-adaptationcircuit may be based on a model of the human visual system, for example.Various algorithms for estimating the adaptation level of the humanvisual system are known in the art. The light adaptation circuit mayimplement such algorithms in any suitable manner including softwareexecuting on one or more programmable data processors, fixed logiccircuits, or combinations thereof. Values for the mid-tone contrastand/or the locations of points 57C in the transfer functions may beautomatically controlled in response to an output from thelight-adaptation circuit.

In some embodiments, transfer functions are set up once for a targetdisplay. The transfer functions may, for example, be built into thetarget display and embodied in the form of one or more programmableprocessors executing firmware or other software that performs mappingaccording to transfer functions as described above; lookup tables whichimplement the transfer functions described above; hard-wired orconfigurable logic circuits that are set up to provide output based onthe transfer functions as described above; or the like.

In some embodiments, drive values for red, green and blue channels ofthe target display are converted to a bit depth that matches that of thedisplay. For example, the display may use 8-bit drive values. If thetransfer functions are applied using floating-point or otherhigher-precision calculations then the conversion may involve, forexample, rounding the drive values to a closest corresponding 8-bitvalue.

In the foregoing embodiments, minimum and maximum luminance values forthe input video data can be made to map respectively to minimum andmaximum brightness values for pixels of the display. Furthermore, aselected mid-tone point from the input video signal can be made to mapto a selected mid-tone point for the display. Mid-tone contrast remainsa free parameter. Another feature of the transfer functions describedabove is that they provide compression or expansion both for low andhigh values while preserving local contrast in a mid-tone range.

In some embodiments, particular images (a particular video frame orsequence of video frames, for example), are relatively low averageluminance (low key) whereas other images (e.g. frames or groups offrames) may be deliberately made to have a relatively high averageluminance (high key). In some embodiments, information about theintended key of the image is provided in the form of metadata. Themetadata may, for example, be created and associated with the image dataduring a color grading operation. For example, metadata may be embeddedin or otherwise associated with a signal carrying color graded videodata. In such embodiments, the key of the image, as indicated by themetadata, may be used in determining the mid-tone anchor point(s) usedin the transfer functions. Where the metadata indicates a low key imagethe vertical coordinate of the anchor point may be moved to a lowervalue, thus recreating the key in the target display.

Different video content may be color graded for different referencedisplays. When following the approach described above, it can bedesirable to map the content differently in any particular targetdisplay depending upon the characteristics of the reference display onwhich the color grading was performed. Information identifying thereference display or its characteristics may, for example, be carried inmetadata embedded in or otherwise associated with image data. A targetdisplay may store parameters for a plurality of different sets oftransfer functions. The different sets of transfer functions maycorrespond to and be used for video data that has been color timed usingdifferent reference displays.

Another feature of the example transfer functions having the formprovided by Equation (1) is that the same transfer function may provideeither compression or expansion at high and low ends of the range,depending upon the parameters chosen. For example, in a case where thetarget display has a larger luminance range than the input data then thetarget display may be configured with transfer functions that expand therange of the image data to match or more closely approach that of thetarget display.

One advantage of the methods and apparatus according to some embodimentsdescribed herein are that mapping is performed in the RGB color space ofthe target display.

This can save very significant amounts of computation and/or reduce thecomplexity of hardware required to perform the mapping.

Mapping may be performed in real time.

Methods according to some embodiments provide direct control over eachof: 1) the average image brightness (“adaptation point”), 2) themid-tone local contrast (as set by the tone-curve slope), 3) the inputblack maps to the minimum display luminance, and 4) the input white mapsto the maximum display luminance. These variables have been found to befundamental for providing images that recreate creative intent asembodied in original image data. In example embodiments these variablesexplicitly correspond to separate parameters. Such methods consequentlyprovide a simple and effective way to perform color mapping which takesoriginal image data (which may, for example comprise high dynamic range(HDR) data and/or color-graded image data) and maps the original imagedata into the limited 3-dimensional gamut of a specified output display.

Color mapping methods and apparatus as described herein may also or inthe alternative be used in color grading/content creation. A coloristmay be provided with a filter which implements transformations asdescribed above. The filter may have controls which allow the coloristto directly set parameters of the transfer functions. The colorist mayuse these controls, for example, to adjust black level etc. In someembodiments, the controls include controls that allow direct setting ofone or more of: one or more coordinates for one or more of a white levelanchor point, a black level anchor point and a mid-level anchor point(e.g. points 57A, 57B and 57C respectively) and a mid-level contrast(e.g. the parameter n). Such controls can allow the colorist to set thewhite level, black level and key without significantly affecting themid-tone slope and vice versa.

In some embodiments, the apparatus is set to automatically determine astarting set of parameters that may be close to what the coloristintends. These starting parameters may, for example, be generated basedon information characterizing the input video content (e.g. minimum andmaximum values for pixel color/luminance coordinates) and informationcharacterizing a target display (e.g. white level, black level andoptionally metadata (e.g. metadata indicating a key of the image databeing processed).

Video production involves creating different versions for displayshaving greater and lower capabilities. For example, Standard DynamicRange (SDR) grading may be performed for producing video for display onlegacy displays. A tool as described herein may be applied to create aSDR version of video automatically. A colorist may guide operation ofthe tool to produce optimized results.

Furthermore, where a colorist has set the parameters to provide aversion for viewing on a lower capability display then parameters foruse in performing mapping for displays having intermediate capabilitiesmay be determined from the parameter values selected by the colorist forthe lower capability display. This may be done, for example, byinterpolation of the parameter values established by the colorist fordisplays having higher and lower capabilities than the display havingintermediate capabilities.

Methods and apparatus described herein are not restricted to use inconnection with professional-level color timing Tools for color-timingare available to amateurs, and even where color-timing is performed on anon-calibrated monitor (e.g., a home computer display, television, etc.)methods and apparatus described herein may be used to translate contentcreated on the non-calibrated monitor to another display (e.g., byestimating the capabilities of the non-calibrated color timing display).Technology as described herein also has application to signals that arenot color timed.

Combining a Global Tone-Mapping Operator with a Local Multi-ScaleTone-Mapping Operator

Color mapping methods and apparatus as described herein may also becombined with other tone mapping techniques, e.g., local tone mappingoperators (TMOs). FIG. 6 depicts an example embodiment where a globaltone mapping operator as described herein is combined with a localmulti-scale tone mapping operator as the one described by G. J. Ward inU.S. Provisional Application 61/448,606, “A Local MultiscaleTone-Mapping Operator,” (herein to be referred to as the “Ward”reference), filed also as International Patent Application No.PCT/US2012/027267, filed on 1 Mar. 2012, incorporated herein byreference in its entirety. The example embodiment combines thepredictability and stability of the global TMO with the ability topreserve highlights and color fidelity when using a local multi-scaleoperator (MS TMO).

As depicted in FIG. 6, method 60 starts in step 62 by accessing inputimage or video data. These data may be stored or transmitted in avariety of color formats, such as YCbCr, RGB, XYZ, and the like. In step63, one may extract the luminance component, e.g., Y, from the inputdata. Depending on the format of the input data (e.g., RGB) this stepmay require a color transformation (e.g., RGB to XYZ). Step 64 may applya global tone mapping operator 55, as described by equation (1), to theY color component of the input data. In an example embodiment, theanchor points of global TMO 55 may be selected so that the luminancerange of the input data is mapped to the range [4*L_(dMin), ½*L_(dMax)],where L_(dMin) and L_(dMax) denote the minimum and maximum luminance ofthe target display. The scaling factors of 4 and ½ are typical, butadjustable.

In an example embodiment, the output of step 64 may be denoted asglobally tone-mapped luminance data Y_(TM). In step 65, one may apply tothe Y_(TM) data a local multi-scale tone-mapping operator (MS TMO) asdescribed by “Ward”. For example, first, one may compute a global Logratio image

$\begin{matrix}{{R_{L} = {\log \; \frac{Y_{TM}}{Y}}},} & (32)\end{matrix}$

defined as the logarithm of the global tone-mapped luminance datadivided by the original luminance pixels. Given the global Log ratioimage R_(L), as described by Ward, the output of the MS TMO (e.g., step65) may be a locally tone-mapped luminance image, denoted as Y_(MS).Using Y_(MS), one may compute

$\begin{matrix}{{X_{MS} = \frac{X*Y_{MS}}{Y}},{and}} & (33) \\{Z_{MS} = {\frac{Z*Y_{MS}}{Y}.}} & (34)\end{matrix}$

In step 66, the X_(MS), Y_(MS), and Z_(MS) data may be converted back toR_(MS), G_(MS), and B_(MS) (RGB_(MS)) data with primaries, white, andblack levels determined by the target display. Negative or out of gamutRGB_(MS) values may be clipped to very small positive values or may bere-mapped to in-gamut RGB values using any of the known gamut mappingalgorithms.

Given in-gamut RGB_(MS) data from step 66, step 67, may reapply theglobal tone mapping operator 55 to all of the color components to outputglobally tone-mapped corrected data RGB_(G-MS). The application of thesecond global tone-mapping operation guarantees that the output of theMS TMO is in the range of the target display. Finally, in step 68,before displaying the image data (step 69), the RGB_(G-MS) data may begamma corrected as needed for the output display.

Certain implementations of the invention comprise computer processorswhich execute software instructions which cause the processors toperform a method of the invention.

For example, one or more processors in a display, a color gradingstation, a set top box, a transcoder or the like may implement imagedata transformation methods as described above by executing softwareinstructions in a program memory accessible to the processors. Theinvention may also be provided in the form of a program product. Theprogram product may comprise any medium which carries a set ofcomputer-readable signals comprising instructions which, when executedby a data processor, cause the data processor to execute a method of theinvention. Program products according to the invention may be in any ofa wide variety of forms. The program product may comprise, for example,physical media such as magnetic data storage media including floppydiskettes, hard disk drives, optical data storage media including CDROMs, DVDs, electronic data storage media including ROMs, flash RAM, orthe like. The computer-readable signals on the program product mayoptionally be compressed or encrypted.

Where a component (e.g. a software module, processor, assembly, device,circuit, etc.) is referred to above, unless otherwise indicated,reference to that component (including a reference to a “means”) shouldbe interpreted as including as equivalents of that component anycomponent which performs the function of the described component (i.e.,that is functionally equivalent), including components which are notstructurally equivalent to the disclosed structure which performs thefunction in the illustrated exemplary embodiments of the invention.

Some non-limiting embodiments may (e.g., depending on circumstances)provide one or more of the following advantages:

-   -   mapping according to a tone mapping curve with a black point        anchor may avoid excessive tonal compression of dark input        content;    -   mapping according to a tone mapping curve with black point        and/or white point anchors may utilize more of the luminance        range of a target display than a tone mapping according to a        curve without one or both of such anchor points;    -   color channel specific mapping functions that maximize luminance        range may be applied in the RGB color space of a target display        (e.g., after conversion from an input color space to the target        display RGB color space); and    -   white point, brightness and/or mid-contrast of output video data        for a target display may be adjusted in the transfer function        (e.g., instead of before or after mapping according to a        transfer function).        Some embodiments may not provide any of the above advantages;        some embodiments may provide different advantages (e.g., rather        than or supplementary to the above advantages).

As will be apparent to those skilled in the art in the light of theforegoing disclosure, many alterations and modifications are possible inthe practice of this invention without departing from the spirit orscope thereof. Accordingly, the scope of the invention is to beconstrued in accordance with the substance defined by the followingclaims.

What is claimed is: 1-32. (canceled)
 33. Apparatus comprising: a pixelcoordinate mapping unit configured to transform image data according toa parameterized transfer function characterized by a plurality of anchorpoints and a free parameter, the parameterized transfer function havinga mid-range slope controlled by the free parameter, whereintransformations at the anchor points are not affected by the freeparameter; wherein the anchor points comprise black level and whitelevel anchor points and a mid-tone anchor point, the black level anchorpoint corresponding to a transformation from a black level of acolor-timing display used in color-timing or approving the image data toa black level of the target display used for display of the transformedimage data, the white level anchor point corresponding to atransformation from a white level of the color-timing display to a whitelevel of the target display; wherein the mid-tone anchor point affects atarget brightness of the image data on the target display; wherein theblack level of the color-timing display differs from the black level ofthe target display and/or wherein the white level of the color-timingdisplay differs from the white level of the target display. 34.Apparatus according to claim 33 wherein the image data comprises sets ofpixel values for pixels in an image, the sets of pixel values comprisingcolor values for each of a plurality of primary colors and the apparatuscomprises a plurality of the pixel coordinate mapping units eachconnected to transform a corresponding one of the color values. 35.Apparatus according to claim 34 comprising an electronic image displaywherein the color values each correspond to a primary color that isnative to the electronic image display.
 36. Apparatus according to claim34 wherein the color values include values for red (R) green (G) andblue (B) primary colors.
 37. Apparatus according to claim 33, furthercomprising an ambient light sensor and a circuit connected to receive anambient-lighting signal from the ambient light sensor and configured tocontrol one or more of the free parameter and a coordinate of one of theanchor points based at least in part on the ambient-lighting signal. 38.Apparatus according to claim 33, wherein the mid tone anchor pointtransforms a representative middle value of the image data to a middlevalue for the target display.
 39. Apparatus according to claim 38,wherein the representative middle value comprises a geometric mean ofthe image data luminance and the apparatus includes a processorconfigured to compute the geometric mean of the image data luminance.40. Apparatus according to claim 38, wherein the apparatus is configuredto receive metadata corresponding to the image data and to set alocation of the mid-tone anchor point based at least in part on theimage data.
 41. Apparatus according to claim 35, wherein the transferfunctions for the mapping units are different from one another. 42.Apparatus according to claim 33, wherein the pixel coordinate mappingunit is configured to perform a transformation according to:$V^{\prime} = \frac{C_{1} + {C_{2}V^{n}}}{1 + {C_{3}V^{n}}}$ where Vis an input coordinate value, V′ is an output coordinate value, C₁, C₂and C₃ are parameters corresponding to anchor points and n is the freeparameter.
 43. Apparatus according to claim 33, wherein the apparatus isconfigured to re-saturate transformed image data pixels according to theamount of tonal compression of the transformed image data pixels. 44.Apparatus according to claim 43, wherein the apparatus is configured tore-saturate the transformed image data pixels based on the slope of thetransfer function at the transformed pixel values.
 45. A method formapping image data for display on a target display, the methodcomprising transforming pixel values of the image data to correspondingtransformed pixel values according to a parameterized transfer functioncharacterized by a plurality of anchor points and a free parameter, theparameterized transfer function having a mid-range slope controlled bythe free parameter, wherein transformations of pixel valuescorresponding to the anchor points are not affected by the freeparameter; wherein the anchor points comprise black level and whitelevel anchor points and a mid-tone anchor point, the black level anchorpoint corresponding to a transformation from a black level of acolor-timing display used in color-timing or approving the image data toa black level of the target display, the white level anchor pointcorresponding to a transformation from a white level of the color-timingdisplay to a white level of the target display; wherein the mid-toneanchor point affects a target brightness of the image data on the targetdisplay; wherein the black level of the color-timing display differsfrom the black level of the target display and/or wherein the whitelevel of the color-timing display differs from the white level of thetarget display.
 46. A method according to claim 45 comprisingcontrolling one or more of the free parameter and a coordinate of one ofthe anchor points based at least in part on a signal indicative ofambient-lighting.
 47. A method according to claim 45 wherein thetransfer function is given by:$V^{\prime} = \frac{C_{1} + {C_{2}V^{n}}}{1 + {C_{3}V^{n}}}$ where Vis an input pixel value, V′ is a transformed pixel value, C₁ , C₂ and C₃are parameters corresponding to anchor points and n is the freeparameter.
 48. Color manipulation apparatus for modifying color valuesin image data, the color manipulation apparatus comprising: a firstmemory or input for source image data; a second memory or output formodified image data; an apparatus according to claim 33 comprising apixel coordinate mapping unit connected to access the first memory orinput and configured to transform the source image data according to atransfer function characterized by a plurality of anchor points and afree parameter, the transfer function having a mid-range slopecontrolled by the free parameter, wherein transformations at the anchorpoints are not affected by the free parameter to yield the modifiedimage data and to provide the modified image data to the second memoryor output; a user input configured to accept from a user a value for thefree parameter; and a display connected to display the modified imagedata.
 49. Color manipulation apparatus according to claim 48 wherein theimage data comprises a plurality of color channels, the apparatuscomprises a plurality of the pixel mapping units, one for each of thecolor channels and the user input is configured to accept from the usera separate value of the free parameter for each of the color channels.50. Color manipulation apparatus according to claim 48 wherein the userinput is configured to accept from a user information specifying alocation of at least one of the anchor points.
 51. A method for mappingimage data for display on a target display, the method comprising:transforming pixel values of the image data to first globallytone-mapped pixel values according to the method of claim 45; andtransforming the globally tone-mapped pixel values to locallytone-mapped pixel values according to a local multi-scale tone mappingmethod.
 52. The method of claim 51, further comprising: transforming thelocally tone-mapped pixel values to second globally tone-mapped pixelvalues according to the method of claim
 16. 53. The method of claim 51,wherein the local multi-scale tone mapping method comprises: generatinga high-resolution luminance ratio image comprising luminance valuesbased on the first globally tone-mapped pixel values; generating, basedat least in part on the high-resolution luminance ratio image, a localmultiscale ratio image that comprises a weighted combination of at leasttwo different ratio images, each being of a different spatial resolutionlevel; and using ratio values in the local multiscale ratio image withluminance values derived from the input data to generate a locallytone-mapped luminance image.